package com.android.jianboshi.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.android.baselibrary.view.Comm_HeadView;
import com.android.jianboshi.R;

import butterknife.BindView;
import butterknife.OnClick;

public class Boxing_Speed_SelectTimeActivity extends BaseActivity {

    @BindView(R.id.comm_title)
    Comm_HeadView comm_title;
    @BindView(R.id.tv_time_10)
    TextView tv_time_10;
    @BindView(R.id.tv_time_20)
    TextView tv_time_20;
    @BindView(R.id.tv_time_30)
    TextView tv_time_30;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_boxing_speed_time;
    }

    @Override
    protected void initView() {
        comm_title.setTitle(getString(R.string.speed_selecttime));

        String unit = getString(R.string.speed_selecttime_unit);
        tv_time_10.setText("10 " + unit);
        tv_time_20.setText("20 " + unit);
        tv_time_30.setText("30 " + unit);

    }

    @Override
    protected void initData() {
        getData();
    }

    private void getData() {
    }

    @OnClick({R.id.tv_time_10, R.id.tv_time_20, R.id.tv_time_30})
    public void onViewClicked(View view) {
        Intent intent = new Intent(mContext, Boxing_SpeedActivity.class);
        switch (view.getId()) {
            case R.id.tv_time_10:  //10秒
                intent.putExtra("time", 10);
                break;
            case R.id.tv_time_20:  //20秒
                intent.putExtra("time", 20);
                break;
            case R.id.tv_time_30:  //30秒
                intent.putExtra("time", 30);
                break;
        }
        startActivity(intent);
    }

}
